<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>Snapshots</h1>
<ul>
    <li>
        <a href="u=1245538184,752165177&fm=23&gp=0.jpg" title="A" onclick="showPic(this); return false;">A</a>
    </li>
    <li>
        <a href="下载.jpg" title="B" onclick="showPic(this); return false;">B</a>
    </li>
    <li>
        <a href="下载%20(2).jpg" onclick="showPic(this); return false;">C</a>
    </li>
    <li>
        <a href="下载%20(1).jpg" onclick="showPic(this); return false;">D</a>
    </li>
</ul>
<div id="parent">
    <img src="placeholder.jpg" id="placeholder">
</div>
<div id="description">
    dlksnaldknsaldnksa
</div>
<div id="testdiv">
</div>
<script src="showPic.js"></script>
<script src="index.js"></script>
<script>
    document.write('你好');
    function timeout() {
        var para = document.createElement('p');
        var parent = document.getElementById('testdiv');
        parent.appendChild(para);
        var text = document.createTextNode('hello world');
        para.appendChild(text);
        move();
    }
    function move() {
        var elem = document.getElementById('testdiv');
        var xpos = parseInt(elem.style.left);
        var ypost = parseInt(elem.style.top);
        if (xpos == 200 && ypos == 100) {
            return true;
        }
        if (xpos < 200){
            xpos++;
        }
        if(xpos > 200) {
            xpos--;
        }
        if(ypost < 100) {
            ypost++;
        }
        if(ypost > 100) {
            ypost--;
        }
        elem.style.left = xpos + "px";
        elem.style.top = ypost + "px";
        var movement = setTimeout('move()',10);
    }
    setTimeout('timeout()',2000);
    console.log(typeof 1);
    console.log(typeof(null));
    var messagel;
    console.log(typeof messagel);
    var car = null;
    console.log(typeof car);
    console.log(Number.MAX_VALUE);
    console.log(Number.MIN_VALUE);
    console.log(isNaN(NaN));
    console.log(isNaN('bule'));
    console.log(isNaN(0x5));
    console.log(Number("hello world"));
    console.log(Number(""));
    console.log(Number("000111"));
    console.log(Number(true));
    console.log(parseInt("1234.32131"));
    console.log(parseInt(""));
    console.log(parseInt("0xA"));
    console.log(parseInt("070",8));
    var age = 11;
    console.log(age.toString(2));
    var o = new Object();
    console.log(typeof o);
    var person = new Object();
    console.log(person instanceof Object);
    var person = new Object();
    person.name = 'hehe';
    person.age = 29;

    var person1 = {
        name: 'hehe',
        age: 29
    };
    var person2 = {};
    person2.name = 'haha';
    person2.age = 37;

    console.log(person.toSource());
    console.log(person1.toSource());
    console.log(person2.toSource());
</script>
</body>
</html>